package com.guangzi.service.impl;

import com.guangzi.entity.HUser;
import com.guangzi.mapper.HuserDao;
import com.guangzi.service.AbstractService;
import com.guangzi.service.HuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class HuserServiceImpl extends AbstractService implements HuserService {


    private HuserDao huserDAO;

    @Autowired
    public void setHuserDAO(HuserDao huserDAO) {
        super.setBaseDAO(huserDAO);
        this.huserDAO = huserDAO;
    }


    @Override
    public HUser getByNamePwd(String phone, String pwd) {
        return huserDAO.getByNamePwd(phone, pwd);
    }

    @Override
    public HUser getByPhone(String phone) {
        return huserDAO.getByPhone(phone);
    }

    @Override
    public Long register(Object obj) {
        return huserDAO.register(obj);
    }

    @Override
    public String findPwd(Long huid) {
        return huserDAO.findPwd(huid);
    }

    @Override
    public void updatePwd(Long huid, String hpwd) {
        huserDAO.updatePwd(huid, hpwd);
    }
}
